package com.fxb.learn.fxb_aop;

import com.fxb.learn.fxb_aop.point.PointA;
import com.fxb.learn.fxb_aop.point.PointB;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@Aspect
@EnableAspectJAutoProxy
@RestController
public class FxbAopApplication {

    public static void main(String[] args) {
        SpringApplication.run(FxbAopApplication.class, args);
    }

    @Autowired
    private PointA pointA;
    @Autowired
    private PointB pointB;

    @GetMapping("test1")
    public String test1() {
        pointA.test();
        pointB.test("aaa");
        return "success";
    }

}
